-
Notifications
You must be signed in to change notification settings - Fork 0
D1-14: Implement Recipe Detail #46
Merged
Merged
+1,874
−37
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hasanmo
approved these changes
Oct 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some options works as frontend elements but they dont work as functionality like the edit recipe, save cookbook and the ratings, maybe will work when the database and endpoints are ready and can be used. Seems very nice, step by step we are reaching the goal.
9ca815e to
abaa84c
Compare
hasanmo
added a commit
that referenced
this pull request
Oct 13, 2026
…foundation (#49) * 2 set up global styles and design tokens (#3) * feat: add design tokens and cascade layers * feat: add global reset and base styles * feat: add shared style utilities and wire global styles * test: add visual style verification pages * docs: document styling structure and usage * fix: apply Prettier formatting for CI * 5 add shared icon library (#6) * feat: add shared icon library * feat: add reusable Icon component * test: add icon showcase for visual verification * fix: apply Prettier formatting to icon files * Add foundational UI components (#8) feat: add foundational UI components - add shared UI utility components - add UI component test setup - add test cleanup after each test - added visual showcases, for design and responsive testing - handle avatar initials safely - apply Prettier formatting to UI components * Add form navigation UI components (#10) Add form navigation UI components * feat: add form UI components * feat: add selection and filter components * feat: add navigation and menu components * test: add form and navigation component verification * fix: apply Prettier formatting to UI components * 9 build the app shell and core routes (#11) * feat(shell): add app shell and core routes Refs: #9 * feat(shell): refine app shell structure and navigation Refs: #9 * fix(shell): tune responsiveness of site-header Refs: #9 * fix(web): add mobile viewport metadata Refs: #9 * fix(shell): reduce space between header and content Refs: #9 * Add feedback overlay UI components (#13) * feat: add feedback UI components * feat: add dialog and overlay components * test: add feedback and overlay component verification * docs: document shared UI component library * fix: apply Prettier formatting to UI components * feature(recipes): add recipe models and mock dataset (#15) Co-authored-by: Hasan Mohammad Fawzi <hasan.fawzi@hoglund.no> * feature(auth): implement D1-05 mock authentication flow (#17) * feature(auth): add mock authentication flow * fix(auth): align mock user with shared data strategy --------- Co-authored-by: Hasan Mohammad Fawzi <hasan.fawzi@hoglund.no> * Add reusable RecipeCard and recipe metadata components (#18) * feat: add reusable logo mark * feat: add shared recipe metadata components * feat: add reusable RecipeCard * feat: add RecipeCard showcase * test: add RecipeCard interaction tests * fix: apply Prettier formatting to RecipeCard files * comment(docs): add project concept and setup guide (#19) * comment(docs): add project concept and setup guide * comment(docs): Update readme doc --------- Co-authored-by: Hasan Mohammad Fawzi <hasan.fawzi@hoglund.no> * style: fix Prettier formatting * style: fix Prettier formatting * test: align quality checks with auth pages * fix(deploy): retry API health check during startup (#22) Co-authored-by: Hasan Mohammad Fawzi <hasan.fawzi@hoglund.no> * Add Explore-page with pagination and search (#26) * feat: add reusable pagination helper and tests * feat: implement Explore search and recipe browsing * docs: clarify AI use in development * fix: improve Explore focus and status feedback * fix: Applied prettier to ExplorePage * Explore filters, URL state, and Save to Cookbook (#31) * feat(explore): add responsive filter and sort controls * feat(explore): implement browse query and URL state * feat(explore): add shared mock save state * docs(explore): add server integration notes * 35 frontend for add recipe (#40) * feat: add initial RecipeCreatePage Refs: #35 * chore(add recipe): update recipe routing in App Refs: #35 * feat(add recipe): add image preview Refs: #35 * chore(add recipe): resize instruction box Refs: #35 * feat(add recipe): add custom styling to image selector Refs: #35 * feat(add recipe): add drag-and-drop for images and update styling Refs: #35 * feat(add recipe): add re-order of ingredients and instructions Refs: #35 * Implement My Cookbook Frontend with Mock Data (#43) * feat: implement cookbook browsing with shared recipe logic * fix: refine cookbook filters and navigation semantics * fix: make sheet body scroll within viewport * test(cookbook): cover apply, clear and invalid mobile filters * refactor(header): use LogoMark and LinkButton (#45) * D1-14: Implement Recipe Detail (#46) * feat(recipe-detail): implement recipe detail page * feat(recipe-detail): improve accessibility, add test recipe, and update tests * feat(recipe-detail): refine serving amount rounding * style(recipe-detail): refine layout and responsive sizing * test(recipe-detail): update tests for responsive controls * test(e2e): update recipe detail smoke test to use a real recipe route * Hasan/feat/database auth (#41) * feat(auth): add database authentication and persistent sessions * fix(auth): address review feedback * fix(auth): protect routes and await session restoration * fix(routes): use cookbook and recipe detail pages * fix(routes): render recipe detail page after merge * fix(e2e): align smoke tests with recipe and protected routes --------- Co-authored-by: Hasan Mohammad Fawzi <hasan.fawzi@hoglund.no> * Added 404-handling and Not Found Page * Hasan/feat/database model (#47) * feat(auth): add database authentication and persistent sessions * fix(auth): address review feedback * feat(db): add recipe database model and migration * fix(db): address recipe model review feedback --------- Co-authored-by: Hasan Mohammad Fawzi <hasan.fawzi@hoglund.no> --------- Co-authored-by: Ole Stangeland <olestan@stud.ntnu.no> Co-authored-by: Oliver Ørjavik <oliveror@stud.ntnu.no> Co-authored-by: Hasan Mohammad Fawzi <hasan.fawzi@hoglund.no>
Sign in
to join this conversation on GitHub.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change
Implemented the Recipe Detail page and connected recipe cards to the new
/recipes/:idroute.The page now displays recipe imagery, author information, category and tags, rating information, preparation metadata, ingredients, instructions, description, visibility state, and responsive recipe actions.
Added responsive Recipe Detail layouts for desktop, tablet, and mobile, including adaptive image sizing and cropping, handling for long titles and larger tag sets, and separate layouts for recipe description and serving controls.
Added adjustable servings with automatically scaled ingredient amounts and formatting appropriate to the resulting quantity. The page also includes a Jump to Recipe action for quickly navigating to the recipe content.
Implemented recipe ownership and visibility behavior:
Recipe ratings are stored in shared Zustand state for the current mock session. Active saved and rated states are reflected visually and through accessible labels.
Recipe navigation now preserves the originating Explore or Cookbook URL so the Back action can return users to the exact browse state, including search, filters, sorting, and pagination. Directly opened recipes fall back to the appropriate Explore or Cookbook route.
Added the reusable
RecipeRatingInputcomponent with accessible native radio controls, added serving adjustment icons, and expanded mock recipe data with a larger test recipe for exercising long titles, tags, ingredients, instructions, and responsive layout behavior. Also changed images to 3:2 base format.Updated related Explore and Cookbook tests and mock-query expectations to account for the additional recipe data, and added dedicated Recipe Detail tests for actions, serving scaling, ratings, ownership, private recipes, navigation state, and not-found behavior.
Closes #44
Merge order
This PR should be merged after the Header Refactor PR (
refactor-header).Expected order:
feature/d1-13-cookbookrefactor-headerrecipe-detailVerification
Course requirements and AI use
Supports responsive design, accessibility, routing, shared state management, reusable components, conditional rendering, user interaction, and testing.
AI was used as a development aid for planning, implementation, responsive layout refinement, accessibility improvements, tests, and state-management decisions. I reviewed and refined the generated suggestions and code.